package com.example.minisqlite;

import java.sql.SQLException;

public class DeleteStatement implements Statement {

    private final String tableName;
    private final Engine.Filter filter;

    public DeleteStatement(String tableName, Engine.Filter filter) {
        this.tableName = tableName;
        this.filter = filter;
    }

    @Override
    public ResultSet execute(Engine engine) throws SQLException {
        return engine.delete(tableName, filter);
    }
}
